import React, { PureComponent, createContext, forwardRef } from 'react'
import Styled from 'styled-components'

// 改方法返回一个组件
const Topdiv = Styled.div`
  color: red;
  font-size: 50px;

  .baner {
    color: yellow;
    &.active {
      color: blue;
    }
    &:hover {
      color: green;
    }
  }
`

export default class Test extends PureComponent {
  render() {
    return (
      <>
        <div>Test</div>
        <hr />
        <Topdiv>
          <p>aaa</p>
          <div className='baner active'>bbb</div>
          <div className='baner'>ccc</div>
        </Topdiv>
      </>
    )
  }
}
